<?php
// +-------------------------------------------------------------------------------
// | DingZone [ A Rapid Development Framework For Dingtalk ]
// +-------------------------------------------------------------------------------
// | 钉钉机器人消息基础类 v1.0
// |
// | Copyright (c) 2014-2018 http://www.heimalanshi.com All rights reserved.
// | Author : Jie
// | Date : 2018-08-09
// +-------------------------------------------------------------------------------

namespace ding\msg\robot;

/**
 * 给机器人发送的消息
 *
 * @package ding\msg\robot
 */
abstract class RobotMsg {
    protected $msgtype;

    /**
     * 构造函数
     * @param $msgtype
     */
    public function __construct($msgtype) {
        $this->msgtype = $msgtype;
    }

    /**
     * 转换为可发送的消息格式
     *
     * @return array
     */
    abstract public function toMsg();
}